home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 May / Ahoy_Magazine_85-05_1985_Double_L.d64 / fast menu 64 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  74 lines

  1. 5 print"[147]":poke53280,0:poke53281,6:poke646,7
  2. 7 rem
  3. 8 rem disable run/stop and restore
  4. 9 rem
  5. 10 poke 792,193:poke 808,239:poke 657,128
  6. 20 dim v$(23)
  7. 27 rem
  8. 28 rem set v$() to row numbers
  9. 29 rem
  10. 30 v$(0)="":for i=1 to 23:v$(i)=v$(i-1)+"":next
  11. 37 rem
  12. 38 rem set old and new color locations and color strings
  13. 40 np=2:xp=0:xc$="[158],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
  14. 41 hc$=""+right$(xc$,39)
  15. 47 rem
  16. 48 rem print the menu
  17. 49 rem
  18. 50 cr$=chr$(13):print "[147]          choose your sandwich"
  19. 51 print "     f5=up   f7=down   space=choice"
  20. 52 print cr$"***********************"cr$"*                     *"
  21. 53 print "*  roast beef         *"cr$"*  corned beef        *"
  22. 54 print "*  shaved ham         *"cr$"*  pastrami           *"
  23. 55 print "*  turkey & salami    *"cr$"*                     *"
  24. 56 print "***********************"cr$cr$cr$cr$cr$cr$
  25. 57 print "         press run/stop[146] to quit";
  26. 60 gosub 900:xp=np
  27. 97 rem
  28. 98 rem read keyboard
  29. 99 rem
  30. 100 a=peek(197):if a=64 then 100
  31. 107 rem
  32. 108 rem quit?
  33. 109 rem
  34. 110 if a=63 then 800
  35. 117 rem
  36. 118 rem choice made?
  37. 119 rem
  38. 120 if a=60 then gosub 200:goto 100
  39. 127 rem
  40. 128 rem move up?
  41. 129 rem
  42. 130 if a=6 then np=np-1:if np<0 then np=4
  43. 137 rem
  44. 138 rem move down?
  45. 139 rem
  46. 140 if a=3 then np=np+1:if np>4 then np=0
  47. 147 rem
  48. 148 rem if move, go do it
  49. 149 rem
  50. 150 if np<>xp then gosub 900:xp=np
  51. 160 poke 197,64:goto 100
  52. 200 if peek(197)<>64 then 200
  53. 207 rem
  54. 208 rem clear old choice
  55. 209 rem
  56. 210 print "you chose:"cr$"                         [145]"
  57. 217 rem
  58. 218 rem jump table
  59. 219 rem
  60. 220 on np+1 goto 300,400,500,600,700
  61. 300 print "roast beef on wheat":return
  62. 400 print "corned beef on rye":return
  63. 500 print "shaved ham on a croissant":return
  64. 600 print "pastrami on toast":return
  65. 700 print "turkey & salami on roll":return
  66. 797 rem
  67. 798 rem restore and end
  68. 799 rem
  69. 800 if peek(197)<>64 then 800
  70. 810 print "[147]":poke 792,71:poke 808,237:poke 657,0:poke 198,0:end
  71. 897 rem
  72. 898 rem print colors using false screen memory
  73. 900 poke 648,60:print v$(np+5)hc$v$(xp+5)xc$:poke 648,4:return
  74.